<?php
namespace api\common\model;
use think\Db;
class ShopConfig extends \think\Model 
{
    protected $autoWriteTimestamp = true;
    protected $table = 'shop_config';
    

    /**
     * 根据项目id获取项目信息
     */
    public function selById($id,$shopId){
        $res =Db::name($this->table)->where('id',$id)->where('shopId',$shopId)->find();
        return $res;
   }

   /**
    * 根据门店id获取项目列表
    *   @param $shopId 门店id
    */
    public function selByShopId($shopId){
        $field = array('id','name','shopId','shopMoney','discountMoney','discount','status','commondityId');
        $res =Db::name($this->table)->where('shopId',$shopId)->field($field)->select();
        return $res;
    }


    /**
     * 获取店中纯色美甲的价格信息
     */
    public function getPureInfo($shopId){
        $res =Db::name($this->table)->where('shopId',$shopId)->find();
        return $res;
    }
}
